package com.hand.cloud.service;

import com.hand.cloud.entity.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;
@Component
@FeignClient(value = "CLOUD-PROVIDER")
public interface UserClientService
{
    @RequestMapping(value = "/user/get/{id}",method = RequestMethod.GET)
    public User queryOne(@PathVariable("id") Integer id);

    @RequestMapping(value = "/user/queryAll",method = RequestMethod.GET)
    public List<User> queryAll();

    @RequestMapping(value = "/user/addUser",method = RequestMethod.POST)
    public boolean addUser(User user);

}